package edu.zut.cs.software.example.space.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import edu.zut.cs.software.example.domain.BaseEntity;

/**
 * 
 * @author ma jiang tao
 *
 */

@Table(name = "T_Space")
@Entity
public class Space extends BaseEntity<Long> {

	private static final long serialVersionUID = 1L;

	@Column
	private String name; // 名字
	@Column
	private String dynamic;// 内容
	@Column
	private String message;// 标题
	@Column
	private String vistor;// 查看次数
	@Column
	private String state;// 状态
	
	/**
	 * Many space objects relate to one category of space.
	 * 
	 * 
	 */
	@Column
	Long studentid;
	
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDynamic() {
		return dynamic;
	}

	public void setDynamic(String dynamic) {
		this.dynamic = dynamic;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getVistor() {
		return vistor;
	}

	public void setVistor(String vistor) {
		this.vistor = vistor;
	}


	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Long getStudentid() {
		return studentid;
	}

	public void setStudentid(Long studentid) {
		this.studentid = studentid;
	}

	@Override
	public String toString() {
		return "Space [name=" + name + ", dynamic=" + dynamic + ", message=" + message + ", vistor=" + vistor
				+ ", state=" + state + ", studentid=" + studentid + "]";
	}

	

	

	// @ManyToOne
	// @JoinColumn(name="SPACE_CATEGORY_ID")
	// SpaceCategory spaceCategory;

}
